       clpfd:dispatch_global(monitoringPaire(Val1,Val2,Index,L1,L2),state(_),state(_),Actions) :-
                monitoringPaire_solver(Val1,Val2,Index,L1,L2,Actions).

        monitoringPaire(Val1,Val2,Index,L1,L2):-
                  Susp = [dom(Index),dom(Val2),dom(Val1)],
                  fd_global(monitoringPaire(Val1,Val2,Index,L1,L2), state(_), Susp).
               
               
        monitoringPaire_solver(Val1,Val2,Index,L1,L2,Actions) :-
                element(Index,L1,Val1),element(Index,L2,Val2),
                write(L1), write('\n'),
                write(L2), write('\n'),
                write(Index),write('\n'),                
                (number(Index) -> Actions = [exit] 
                ; Actions = []).    

                
                                
                                
/*
Permet de visualiser le nombre de paires inscrites dans la matrice
*/
        monitoring(K,I):-
                dom_suspensionsDomains(I,Susp,[]),
                fd_global(monitoring(K,I), state(I), Susp).

        monitoring_solver(K,I0,I,Actions):-
                
                monitoring_filter(I0,I2,N),
              length(I0,Li),
                   copy(I2,I),
                 open('monitoringIFF.txt', append, Stream),write(Stream,Li),write(Stream,','),write(Stream,K),nl(Stream),close(Stream) ,      
                 (  N == 0 -> Actions = [exit]
                  ;Actions = []).


        monitoring_filter([A|R],I2,N):- 
               number(A), 
               ! ,
               monitoring_filter(R,I2,N).

        monitoring_filter([A|R],[A|I2],N2) :- 
               monitoring_filter(R,I2,N),
               N2 is N +1 .
        
        monitoring_filter([],[],0).


        lineConstraint(Li,Ctr,FT):-
                dom_suspensionsDomains(Li,Susp,[]),
                fd_global(lineConstraint(Li,Ctr,FT), state(Li), Susp).
        
/*

 domain([F,G],-1,0),opt(F,[G]), value([-1,0],[F,G]),\+(\+(callRec([value([-1,0],[F,G]),assert(p1(Li0))]))).
*/

      lineConstraint_solver(Li,_,FT,Actions):-
                
              \+(\+(callRec([value(Li,FT),assert(p1(Li))]))),p1(T), retractall(p1(_)),       
 
              
                        cpDomain(T,Li,Ps),      
           
                        ligne_Filter(T,N),             
              (N == 0 -> Actions = [exit |Ps]
               ; Actions = Ps).
              

s